#pragma once
#include <iostream>
#include <string>
#include <cstring>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include<functional>

enum ExitCode
{
    OK = 0,
    USAGE_ERR,
    SOCKET_ERR,
    BIND_ERR,
    LISTEN_ERR,
    CONNECT_ERR,
    FORK_ERR
};

class Nocopy
{
public:
    Nocopy(){}
    ~Nocopy(){}
    Nocopy(const Nocopy &) = delete;
    const Nocopy &operator=(const Nocopy &) = delete;
};


#define COW(addr) ((sockaddr*)&addr)
